<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'export-information-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'etd'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker',
              array(
                    'model'=>$model,
                    'attribute'=>"etd",
                    'htmlOptions'=>array('size'=>35),
                    'options'=>array('dateFormat'=>'dd/mm/yy'),
                   )
             );
		?>
		<?php echo $form->error($model,'etd'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'out_permit'); ?>
		<?php echo $form->textField($model,'out_permit', array('size'=>35,'maxlength'=>15)); ?>
		<?php echo $form->error($model,'out_permit'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'awb'); ?>
		<?php echo $form->textField($model,'awb', array('size'=>35,'maxlength'=>25)); ?>
		<?php echo $form->error($model,'awb'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'vessel'); ?>
		<?php echo $form->textField($model,'vessel', array('size'=>35,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'vessel'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'mode'); ?>
		<?php echo $form->textField($model,'mode', array('size'=>35)); ?>
		<?php echo $form->error($model,'mode'); ?>
	</div>
	
	<div class="row buttons">
		<?php 
        	$this->widget('zii.widgets.jui.CJuiButton',array(
        		'name'=>'submit',
        		'caption'=>'Save',
        		'value'=>"save",
        	)); 
        ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
<?php
$cs = Yii::app()->ClientScript;
$ViewUrl = CHtml::normalizeUrl(array('export_information/view'));
$script =<<<EOD
$.export_information_create_form = {
	afterSubmit:function(data){
		window.location = "$ViewUrl?id="+data.id;
	}
};
$('#export-information-form [type=submit]').click(function(){
	var form = $.extend($.simplelogform,$.export_information_create_form);
	form.Submit($('#export-information-form'));
	return false;
});
EOD;
$cs->registerScript('export_information#form',$script);
?>